package com.dao;

import com.pojo.Emp;
import com.pojo.Student;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;


public interface StudentDAO extends JpaRepository<Student,Integer> {

    @Query(value = "from Emp e where (?1 is null or e.empId=?1) and (?2 is null or e.empName like ?2) and (?3 is null or e.cs<=?3) and (?4 is null or e.cs>=?4)")
    public Page<Emp> search(Integer empId, String empName, String begin, String end, Pageable pageable);
}
